﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Example2.Model
{
    class Model
    {

        Player m_player = new Player();
        const float m_rightEdge = 1;

       

        internal void Update(float a_elapsedTime)
        {
            //get a new position for the player
            m_player.Update(a_elapsedTime);


            //check level constraint
            if (m_player.GetPosition() > m_rightEdge)
            {
                //player has exited level so move him left
                m_player.SetPosition( 0 );
            }
        }


        internal float GetPlayerPosition()
        {
            return m_player.GetPosition();
        }
    }
}
